package com.cbn.ibcp.jishiting.statistic.enums;

import lombok.Getter;

@Getter
public enum DateTypeEnum {

    MINUTE_DATE_TYPE_5_MINUTE(5, "5分钟"),
    MINUTE_DATE_TYPE_10_MINUTE(10, "10分钟"),
    MINUTE_DATE_TYPE_30_MINUTE(30, "30分钟"),
    MINUTE_DATE_TYPE_60_MINUTE(60, "60分钟"),
    MINUTE_DATE_TYPE_120_MINUTE(120, "120分钟"),
    MINUTE_DATE_TYPE_180_MINUTE(180, "180分钟"),
    MINUTE_DATE_TYPE_240_MINUTE(240, "240分钟"),
    MINUTE_DATE_TYPE_360_MINUTE(360, "360分钟"),
    MINUTE_DATE_TYPE_1440_MINUTE(1440, "1440分钟"),
    ;

    private final Integer value;

    private final String desc;

    DateTypeEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }


    public static DateTypeEnum getDateTypeEnum(Integer value) {
        for (DateTypeEnum dateTypeEnum : DateTypeEnum.values()) {
            if (dateTypeEnum.getValue().equals(value)) {
                return dateTypeEnum;
            }
        }
        return null;
    }
}
